package com.itheima.Demo1;

import java.io.*;

public class Demo {
    public static void main(String[] args) throws IOException {
        long l1 = System.currentTimeMillis();

        BufferedInputStream bif = new BufferedInputStream(new FileInputStream("D:\\图片\\nvpy.png"));
        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("day0731\\nvpy.png"));
        byte[] by = new byte[1024];
        int len;
        while((len = bif.read(by)) != -1){
            bos.write(by,0,len);
        }

        bif.close();
        bos.close();
        long l2 = System.currentTimeMillis();
        System.out.println(l2-l1);
    }
}
